<template>
  <div>
    <van-list :finished="true" finished-text="没有更多了" >
      <van-cell v-for="item in searchlist" :key="item.cityId" :title="item.name" @click="cityClick(item.name, item.cityId)" />
    </van-list>
  </div>
</template>

<script>
export default {
  name: 'SearchList',
  props: ['searchlist'],
  methods: {
    cityClick(name, id) {
      this.$store.commit('changeCityName', name)
      this.$store.commit('changeCityId', id)
      this.$store.commit('changeSelectCity', true)
      this.$router.back()
    }
  }
}
</script>

<style>

</style>